<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>54 ES9对象展开, 扩展运算符与rest参数</title>
</head>

<body>
    在对象中使Rest参数与spread扩展运算符；
    <script>
        // function connect({ host, port, user, pass }) {
        //     console.log(host);
        //     console.log(port);
        //     console.log(user);
        //     console.log(pass);
        // }

        // function connect({ host, port, ...user}) {
        //     console.log(host);
        //     console.log(port);
        //     console.log(user);
        // }

        // connect({
        //     host: '127.0.0.1',
        //     port: 3306,
        //     user: 'root',
        //     pass: 'root',
        //     type:'master'
        // });

        const skill1 = {
            q: 'tyb'
        };
        const skill2 = {
            w: 'jzz'
        };
        const skill3 = {
            t: 'tlg'
        };
        const skill4 = {
            p: 'mlbw'
        };

        const manseng = { ...skill1, ...skill2, ...skill3, ...skill4 };
        console.log(manseng);


    </script>
</body>

</html>